import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login'
import Forget from '@/components/Forget'
import Home from '@/components/Home'


import Compile from '@/components/Compile'
import Place from '@/components/Place'
import Unit from '@/components/Unit'


import assetManagement from '@/components/asset/assetManagement'


import assetDetail from '@/components/asset/assetDetail'


import checkManagement from '@/components/check/checkManagement'
import checkDetailManagement from '@/components/check/checkDetailManagement'
import assetRepair from '@/components/repair/assetRepair'
import repairDetail from '@/components/repair/repairDetail'
import allocateManagement from '@/components/allocate/allocateManagement'
import allocateDetail from '@/components/allocate/allocateDetail'
import handleManagement from '@/components/handle/handleManagement'
import handleDetail from '@/components/handle/handleDetail'
import warnManagement from '@/components/warn/warnManagement'


Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/home/check/checkManagement',
      component: checkManagement,
      name: 'checkManagement'
    },
    {
      path: '/home/check/checkDetailManagement',
      component: checkDetailManagement,
      name: 'checkDetailManagement'
    },
    {
      path: '/home/repair/assetRepair',
      component: assetRepair,
      name: 'assetRepair'
    },
    {
      path: '/home/repair/repairDetail',
      component: repairDetail,
      name: 'repairDetail'
    },
    {
      path: '/home/allocate/allocateManagement',
      component: allocateManagement,
      name: 'allocateManagement'
    },
    {
      path: '/home/allocate/allocateDetail',
      component: allocateDetail,
      name: 'allocateDetail'
    },
    {
      path: '/home/handle/handleManagement',
      component: handleManagement,
      name: 'handleManagement'
    },
    {
      path: '/home/handle/handleDetail',
      component: handleDetail,
      name: 'handleDetail'
    },
    {
      path: '/home/warn/warnManagement',
      component: warnManagement,
      name: 'warnManagement'
    },
    {
      path: '/',
      redirect: '/login'
    },
    {
      path: '/login',
      component: Login,
      name: 'Login'
    },
    {
      path: '/forget',
      component: Forget,
      name: 'Forget'
    },
    {
      path:'/home',
      component: Home,
      name: 'Home'
    },
    {
      path: '/home/asset/assetManagement',
      component: assetManagement,
      name: 'assetManagement'
    },

    {
      path: '/home/asset/assetDetail',
      component: assetDetail,
      name: 'assetDetail'
    },
    {
      path: '/home/compile',
      component: Compile,
      name: 'compile'
    },
    {
      path: '/home/place',
      component: Place,
      name: 'place'
    },
    {
      path: '/home/unit',
      component: Unit,
      name: 'unit'
    }
  ]
})
